Recent improvements in printing and typesetting technology have greatly increased the efficiency of setting type for straight linear text, e.g., newspaper text, phone directories, and the like. These improvements, which largely flow from the use of high speed data processors, include techniques for realizing such features as automatic character generation, and justification and hyphenation of linear text. Many of these features are realized in non-impact printing systems not requiring the explicit operation of typesetting. See, for example, M. V. Mathews and J. E. Miller, "Computer Editing, Typesetting, and Image Generation", AFIPS 1965 FJCC Proceedings, Vol. 27, Part 1, pp. 389-398, Spartan Books, Washington, D.C., 1965; F. Park, "The Printed Word", International Science and Technology, Vol. 8, No. 2, pp. 103-109, July 1965 and U.S. Pat. Nos. 3,422,419 and 3,490,004, issued Jan. 14, 1969 to M. V. Mathews et al and Jan. 13, 1970 to R. F. Ross, respectively. Nevertheless, in keeping with much common usage, the present description will proceed with the operation of character positioning characterized as "typesetting".
It is understandable that the emphasis for early efforts in computer typesetting would be in connection with the commonly-occurring, relatively simple linear textual materials. A substantial percentage of modern printing, however, is directed to areas involving the mathematical and other sciences. In these and related fields the preferred method of printed communication often requires the typesetting of a large number of mathematical and other formulas. The automation of typesetting for these more specialized mathematical and related symbols has been considerably less advanced than for linear text material.
Efforts to overcome the difficulties implicit in computer-aided printing of mathematical formulas have been in two principal directions. The first of these involves the interpretation of the formulas in a basically mathematical sense. That is, it is the mathematical and logical meaning of operations which are treated as controlling in the determination of the placing, spacing and relative positioning of the symbols involved. Thus, for example, in the system described in W. A. Martin, "Symbolic Mathematical Laboratory", Ph.D. Thesis, MIT, January, 1967, the basic internal representation of a formula is in terms of its mathematical content, and a display is generated completely automatically from this basic internal representation. The computer program automatically does such things as choose the style and size of parentheses and divide a formula in two if the formula is too long to fit on a single line. The formula division is based on the identification of the mathematical significance of the operators, e.g., a search for an equality sign is made and the position of it used to determine the point of division. Since the display program in this system is completely automatic (given the representation of the formula's mathematical content), it has no provision for the user to insert spaces where he feels they will improve the appearance of the formula or equation. Neither has it a provision for the user to select among various mathematically equivalent representations, e.g., the radical sign is not used, so that .sqroot.(expression) is always represented by (expression) .sup.1/2 ; multiplication is always represented explicitly, so that A(.alpha.+.beta..gamma.) would be represented as A.multidot.(.alpha.+.beta..multidot..gamma.), and the minus sign is not used as a binary relation so that a-b would be represented as a+(-1).multidot.b. It should be noted that the mathematical meaning of the expression is maintained, although the esthetic characteristics of the printed representation are largely not considered.
This brings us to the second area of endeavor in the computerized typesetting of mathematical formulas, namely the positioning of the mathematical symbols in an expression in accordance with their appearance, as distinguished from their mathematical significance alone. It should be understood, of course, in connection with this latter area of interest that the mathematical integrity of the expression must be maintained as well. Some examples of previous work on the problem of improving the esthetic aspects of typesetting mathematical formulas by computer will now be described.
In M. Klerer and F. Grossman "Further Advances in Two-Dimensional Input-Output by Teletype Terminals", AFIPS 1967 FJCC Proceedings, Vol. 31, pp. 675, 687, Thompson Books, Washington, D.C. 1967, for example, there are described techniques for use in connection with a project to publish a table of integrals whose accuracy has been checked by computer programs. The integral is input to the computer program by typing it in a stylized two dimensional format. The program controlled computer then modifies the spacing between symbols thereby removing excessive gaps, centering numerators and denominators and breaking a formula in half if it is too long to fit on one line.
The J. H. Kuney, et al, "Computerized Typesetting of Complex Scientific Material", AFIPS 1966 FJCC Proceedings, Vol. 29, pp. 149-156, Spartan Books, Washington, D.C., 1966, there is described a system for typesetting mathematical equations that is based on the use of macros. This system is intended to be used for typesetting mathematical equations and other materials as well, e.g., this same system can be used to typeset tabular data. Hence this prior art system does not make use of the recursive structure inherent in mathematical equations. For that reason, that system requires a considerable amount of typing to input a mathematical formula and depends much more on the judgment of the typist in determining the spacing of the symbols in a formula.